//
//  NilForView.m
//  Lextra Junior ueb IT
//
//  Created by sonpipi on 10/3/11.
//  Copyright 2011 Phosphon. All rights reserved.
//

#import "NilForView.h"


@implementation NilForView
//__NGUYEN_HUY_SON__
@synthesize navigationBar;
//___END_NGUYEN_HUY_SON__
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)dealloc
{
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    //__NGUYEN__HUY_SON
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) 
    {
        CGFloat navBarHeight = 44.0f;    
        CGRect frame = CGRectMake(navigationBar.frame.origin.x, navigationBar.frame.origin.y, navigationBar.frame.size.width, navBarHeight);
        [navigationBar setFrame:frame];
    }  //___END_NGUYEN_HUY_SON

    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
	return YES;
}
//______NGUYEN_HUY_SON__________________________________________________________________________
#pragma mark -
#pragma mark Managing the popover

- (void)showRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem {
    
    [navigationBar.topItem setLeftBarButtonItem:barButtonItem animated:NO];
}


- (void)invalidateRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem {
    
    // Remove the popover button from the toolbar.
    [navigationBar.topItem setLeftBarButtonItem:nil animated:NO];

}
//___END_NGUYEN_HUY_SON__end____________________________________
@end 
